CC := gcc
CFLAGS := -Wall -g

all: lib example

lib: mynet.c mynet.h
	$(CC) $(CFLAGS) -fPIC -shared mynet.c -o libmynet.so

example: example.c libmynet.so
	$(CC) $(CFLAGS) example.c -L. -lmynet -o example

clean:
	rm -f libmynet.so example